package com.crm.excel.export;

import java.util.Collection;

import javax.servlet.http.HttpServletResponse;

import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public interface ExportExcelImpl<T> {

	/**
	 * 导出excel数据
	 * @param headers 表头即：数据字段名
	 * @param dataset 数据
	 * @param fileName 文件名
	 * @param response
	 */
	public void exportExcel(String[] headers, Collection<T> dataset, String fileName, HttpServletResponse response);
	
	/**
	 * 指定路径下生成excel文件
	 * @param workbook
	 * @param name
	 * @param response
	 * @throws Exception
	 */
	public void getExportedFile(XSSFWorkbook workbook, String name, HttpServletResponse response) throws Exception;
	
}
